/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dings
 * Date: 2024-07-05
 * Time: 21:32
 */

public class Test {
    public static void main(String[] args) {
        Student student1 = new Student("dings", 18);
        Student student2 = null;
        try {
            student2 = (Student) student1.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        student2.name = "xiaoMao";

        System.out.println(student1);
        System.out.println(student2);
    }
}
